package com.scholarship.modules.admin.service;

import com.scholarship.modules.admin.dto.ImportTemplateDto;
import com.scholarship.modules.admin.dto.StudentQueryDto;
import com.scholarship.modules.admin.exce.ImportFailException;
import org.springframework.http.ResponseEntity;

import javax.servlet.http.HttpServletResponse;
import java.io.File;

/**
 * 文件输入输出业务层
 * @Author Z.J.H
 * @create 2021/9/8 20:39
 */
public interface InOutFileService {

    /**
     * 下载指定模板
     * @param tableId
     * @param response
     * @throws Exception
     */
    void downLoadImportTemplate(Integer tableId, HttpServletResponse response) throws Exception;

    /**
     * 下载导入模板压缩包
     * @param response
     * @throws Exception
     */
    void downLoadImportTemplateZip(HttpServletResponse response) throws Exception;

    /**
     * 下载学生信息表
     * @param studentQueryDto
     * @param response
     * @throws Exception
     */
    void downLoadStudentInfo(StudentQueryDto studentQueryDto, HttpServletResponse response) throws Exception;

    /**
     * 导入通用奖项模板
     * @param fileName
     */
    void importCommonTemplate(String fileName) throws Exception;

    /**
     * 导入学生信息模板
     * @param fileName
     */
    void importStudentTemplate(String fileName) throws Exception;

    /**
     * 导入四六级模板
     * @param fileName
     * @throws Exception
     */
    void importCetTemplate(String fileName) throws Exception;

    /**
     * 创建导入模板文件
     * @param tableId
     * @param haveData 是否携带数据
     * @return
     * @throws Exception
     */
    File createImportTemplateFile(Integer tableId, Boolean haveData) throws Exception;
}
